<template>
    <div class="sortcards">
        <img @click="just" :src="item.img" alt="">
        <p>{{ item.text }}<van-tag color="#7232dd">标签</van-tag></p>
        <van-button style="width: 170px; height: 30px;" type="danger">立刻购买</van-button>
    </div>
</template>

<script setup>
import { defineProps } from 'vue'
const props = defineProps(["item"])
import { useRouter } from 'vue-router'
const router = useRouter();
const just = () => {
    router.push({
        path: "/Login",
        query: {
            id: props.item.id,
            text: props.item.text,
            img: props.item.img,
        }
    })
}
</script>

<style lang="scss" scoped>
.sortcards {
    padding: 10px 0 0 10px;
}

.sortcards>img {
    width: 100%;
    height: 300px;
    border-radius: 10px;
}
</style>